﻿@model AMS.DD35.Common.Data.CharacterData

@{
    ViewBag.Title = "Create";
}

<h2>Create New Character</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>CharacterData</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.CharacterName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CharacterName)
            @Html.ValidationMessageFor(model => model.CharacterName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BaseStrength)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BaseStrength)
            @Html.ValidationMessageFor(model => model.BaseStrength)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BaseDexterity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BaseDexterity)
            @Html.ValidationMessageFor(model => model.BaseDexterity)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BaseConstitution)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BaseConstitution)
            @Html.ValidationMessageFor(model => model.BaseConstitution)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BaseIntelligence)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BaseIntelligence)
            @Html.ValidationMessageFor(model => model.BaseIntelligence)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BaseWisdom)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BaseWisdom)
            @Html.ValidationMessageFor(model => model.BaseWisdom)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BaseCharisma)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BaseCharisma)
            @Html.ValidationMessageFor(model => model.BaseCharisma)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EthicalAlignment)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor((model => model.EthicalAlignment),
            ((AMS.DD35.WebMVC3.Controllers.CharacterController)ViewContext.Controller).GetEthicalAlignments())
            @*Model.EthicalAlignments)*@ @*throws NullReferenceException for Model*@
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.MoralAlignment)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor((model => model.MoralAlignment),
            ((AMS.DD35.WebMVC3.Controllers.CharacterController)ViewContext.Controller).GetMoralAlignments())
            @*Model.MoralAlignments)*@ @*throws NullReferenceException for Model*@
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sex)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor((model => model.Sex),
             ((AMS.DD35.WebMVC3.Controllers.CharacterController)ViewContext.Controller).GetSexes())
            @Html.ValidationMessageFor(model => model.Sex)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RaceID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor((model => model.RaceID),
             ((AMS.DD35.WebMVC3.Controllers.CharacterController)ViewContext.Controller).GetRaces())
            @Html.ValidationMessageFor(model => model.RaceID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DeityID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor((model => model.DeityID),
             ((AMS.DD35.WebMVC3.Controllers.CharacterController)ViewContext.Controller).GetDeities())
            @Html.ValidationMessageFor(model => model.DeityID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HairColor)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HairColor)
            @Html.ValidationMessageFor(model => model.HairColor)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EyeColor)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EyeColor)
            @Html.ValidationMessageFor(model => model.EyeColor)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Height)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Height)
            @Html.ValidationMessageFor(model => model.Height)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HeightUnits)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor((model => model.HeightUnits),
             ((AMS.DD35.WebMVC3.Controllers.CharacterController)ViewContext.Controller).GetHeightUnits())
            @Html.ValidationMessageFor(model => model.HeightUnits)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Weight)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Weight)
            @Html.ValidationMessageFor(model => model.Weight)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.WeightUnits)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor((model => model.WeightUnits),
             ((AMS.DD35.WebMVC3.Controllers.CharacterController)ViewContext.Controller).GetWeightUnits())
            @Html.ValidationMessageFor(model => model.WeightUnits)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Experience)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Experience)
            @Html.ValidationMessageFor(model => model.Experience)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Copper)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Copper)
            @Html.ValidationMessageFor(model => model.Experience)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Silver)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Silver)
            @Html.ValidationMessageFor(model => model.Silver)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Gold)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Gold)
            @Html.ValidationMessageFor(model => model.Gold)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Platinum)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Platinum)
            @Html.ValidationMessageFor(model => model.Platinum)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
